//package com.weds.frame.domain.config.mybatis;
//
///**
// * Description:
// * Author: LiuWenQing
// * Datetime: 2023/4/4 10:35
// */
////@Configuration
////public class MybatisConfig {
////
////    @Value("${mybatis-plus.mapper-locations}")
////    private String mapperLocation;
////
////    @Bean
////    public SqlSessionFactory sqlSessionFactory(DataSource dataSource)
////            throws Exception {
////        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
////        sessionFactory.setDataSource(dataSource);
////        // 多mapper地址手动加载
////        PathMatchingResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
//////        String[] split = mapperLocations.split(",");
////        Resource[] resources = resourcePatternResolver.getResources(mapperLocation);
////        Resource[] resources1 = resourcePatternResolver.getResources("");
////        // 合并两个mapper资源
////        sessionFactory.setMapperLocations(ArrayUtil.addAll(resources, resources1));
////        // 设置公共字段的拦截
////        GlobalConfig globalConfig = GlobalConfigUtils.defaults();
////        sessionFactory.setGlobalConfig(globalConfig);
////        return sessionFactory.getObject();
////    }
////
////}
